import { ref } from 'vue'
import { defineStore } from 'pinia'
import { getCategoryApi } from '@/api/layout'


export const useCategoryStore = defineStore('category', () => {
  const category = ref([])
  const getCategory = () => {
    getCategoryApi().then(res => {
      console.log(res);
      category.value = res.result
      console.log(res);
    })
  }

  return { category,getCategory }
})
